<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue动画</title>
    <style>
        .w-leave-active {
            animation: move 5s linear 0s;
        }

        @keyframes move {
            0% {
                transform: translateX(0);
            }

            20% {
                transform: translateX(500px);
            }

            40% {
                transform: translate(500px, 500px);
            }

            60% {
                transform: translate(0, 500px);
            }

            80% {
                transform: translateY(0);
            }

            100% {
                transform: translate(300px, 300px);
            }
        }
    </style>
</head>

<body>
    <div id="app">
        <button @click='isShow=!isShow'>来回移动</button>
        <transition name='w'>
            <h3 v-show='isShow'>尚硅谷</h3>
        </transition>
    </div>

    <script src="../js/vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                isShow: false
            },
            // mounted() {
            //     // console.log(11)
            //     this.isShow = true
            // }
        })
    </script>
</body>

</html>